package com.youlai.boot.factory.model.form;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 客户表单对象
 *
 * @author youlaitech
 * @since 2025-07-06 00:42
 */
@Getter
@Setter
@Schema(description = "客户表单对象")
public class CustomersForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    private Integer id;

    @Schema(description = "客户名称")
//    @NotBlank(message = "客户名称不能为空")
//    @Size(max=100, message="客户名称长度不能超过100个字符")
    private String name;

    @Schema(description = "联系人")
    @Size(max=50, message="联系人长度不能超过50个字符")
    private String contactPerson;

    @Schema(description = "联系电话")
    @Size(max=20, message="联系电话长度不能超过20个字符")
    private String phone;

    @Schema(description = "地址")
    @Size(max=255, message="地址长度不能超过255个字符")
    private String address;

    @Schema(description = "结算方式")
    @Size(max=100, message="结算方式长度不能超过100个字符")
    private String paymentTerms;

    @Schema(description = "创建人ID")
    private Long createBy;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改人ID")
    private Long updateBy;

    @Schema(description = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    /**
     * 备注
     */
    private String remark;
}
